﻿using Joy.Erp.BasicArchives.Core;
using Joy.Erp.BasicArchives.Core.EntityAttributes;
using Joy.Erp.BasicArchives.Core.UniqueCodes;
using Joy.Erp.BasicArchives.Staff;
using System;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;

namespace Joy.Erp.BasicArchives.Suppliers
{
    /// <summary>
    /// 供应商
    /// </summary>
    public class Supplier : ArchiveAggregateRoot, IMultiTenant, IUniqueCode, IHasConcurrencyStamp
    {
        /// <summary>
        /// 所属租户
        /// </summary>
        public Guid? TenantId { get; set; }

        /// <summary>
        /// 供应商类型
        /// </summary>
        public Guid? SupplierTypeId { get; set; }

        /// <summary>
        /// 供应商类型
        /// </summary>
        public SupplierType SupplierType { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        [Unique]
        public string Name { get; set; }

        /// <summary>
        /// 供应商简称
        /// </summary>
        public string ShortName { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        public string Contact { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public Guid? OperatorId { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        public Operator Operator { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool Enabled { get; set; }
    }
}
